package com.wlyuan.open.dto;

import com.wlyuan.open.OpenBaseSyncDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author yuanzheng
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString(callSuper = true)
public class OpenVehicleSyncDTO extends OpenBaseSyncDTO implements Serializable {

    private static final long serialVersionUID = -8402805793919540249L;
    private Long vehicleId;

    @ApiModelProperty(value = "车牌号")
    private String plateNo;

    @Range(min = 1, max = 11, message = "车型不存在")
    @ApiModelProperty(value = "车辆类型")
    private Integer type;

    @ApiModelProperty(value = "车长")
    private Double length;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "载重")
    private BigDecimal loadWeight;

    @Range(min = 0, max = 99, message = "座位数不能大于两位数")
    @ApiModelProperty(value = "座位数")
    private Integer seats;

    @ApiModelProperty(value = "购买日期")
    private LocalDate buyDate;

    @ApiModelProperty(value = "保险过期时间")
    private LocalDate insuranceEndDate;

    @Length(max = 20, message = "车辆品牌最多可输入20个字符")
    @ApiModelProperty(value = "车辆品牌")
    private String brand;

    @ApiModelProperty(value = "车辆图片")
    private String imageUrl;

    @ApiModelProperty(value = "状态")
    private Integer status;

    private LocalDateTime createAt;
    private LocalDateTime updateAt;
    private Long createBy;
    private Long updateBy;
}
